<?php
require_once 'connexion (2).php';

            if (isset($_SESSION['mail']))
		{
                $ses1=$_SESSION['mail'];
		
                $vco1="select * from personne where MAILPERSONNE ='".$ses1."'";
		$res1=$connexion->query($vco1);
		if($donne =$res1->fetch(PDO::FETCH_ASSOC))
		    { 
			$statut1=$donne['TYPEPERSONNE'];
			$id=$donne['IDPERSONNE'];
                        
			if ($statut1 == "admin")
                        { ?>
                                <div id='cssmenu1'>
                                <ul>
                                   <li><a href='index.php' style="background-color: deepskyblue; "><span>Accueil</span></a></li>
                                   <li><a href='sousMenu.php?choix=admin'  style="background-color: deepskyblue; "><span>Admin</span></a></li>
                                   <li><a href='sousMenu.php?choix=professeur'  style="background-color: deepskyblue; "><span>Professeur</span></a></li>
                                   <li><a href='sousMenu.php?choix=eleve'  style="background-color: deepskyblue; "><span>Elève</span></a></li>
                                   <li class='last'><a href='sousMenu.php?choix=maitrestage'  style="background-color: deepskyblue; "><span>Maître de stage</span></a></li>
                                </ul>
                                </div>

                        <?php
                        }
                        elseif ($statut1 == "etudiant")
			{
                        ?>
                                <div id='cssmenu1'>
                                <ul>
                                   <li><a href='index.php' style="background-color: deepskyblue; "><span>Accueil</span></a></li>
                                   <li><a href=''><span>Admin</span></a></li>
                                   <li><a href=''><span>Professeur</span></a></li>
                                   <li><a href='sousMenu.php?choix=eleve' style="background-color: deepskyblue; "><span>Elève</span></a></li>
                                   <li class='last'><a href=''><span>Maître de stage</span></a></li>
                                </ul>
                                </div>
                                <?php
                               
                        }
                        elseif ($statut1 == "professeur")
			{
                            ?>
                                <div id='cssmenu1'>
                                <ul>
                                   <li><a href='index.php' style="background-color: deepskyblue; "><span>Accueil</span></a></li>
                                   <li><a href=''><span>Admin</span></a></li>
                                   <li><a href='sousMenu.php?choix=professeur' style="background-color: deepskyblue; "><span>Professeur</span></a></li>
                                   <li><a href=''><span>Elève</span></a></li>
                                   <li class='last'><a href=''><span>Maître de stage</span></a></li>
                                </ul>
                                </div>
                                <?php
                        }
                        elseif ($statut1 == "maitrestage")
			{
                            ?>
                                <div id='cssmenu1'>
                                <ul>
                                   <li><a href='index.php' style="background-color: deepskyblue; "><span>Accueil</span></a></li>
                                   <li><a href=''><span>Admin</span></a></li>
                                   <li><a href=''><span>Professeur</span></a></li>
                                   <li><a href=''><span>Elève</span></a></li>
                                   <li class='last'><a href='sousMenu.php?choix=maitrestage' style="background-color: deepskyblue; "><span>Maître de stage</span></a></li>
                                </ul>
                                </div>
                                <?php
                        }

                        
                        }else 
                               {?>
                   <div id='cssmenu1'>
                    <ul>
                       <li><a href='index.php' style="background-color: deepskyblue; "><span>Accueil</span></a></li>
                       <li><a href='sousMenu.php'><span>Professeur</span></a></li>
                       <li><a href='sousMenu.php'><span>Elève</span></a></li>
                       <li class='last'><a href='sousMenu.php'><span>Maître de stage</span></a></li>
                    </ul>
                    </div>
                               
                              <?php }  




                    
                }else {
                ?>
                <div id='cssmenu1'>
                <ul>
                   <li><a href='index.php' style="background-color: deepskyblue; "><span>Accueil</span></a></li>
                   <li><a href='sousMenu.php'><span>Professeur</span></a></li>
                   <li><a href='sousMenu.php'><span>Elève</span></a></li>
                   <li class='last'><a href='sousMenu.php'><span>Maître de stage</span></a></li>
                </ul>
                </div>
                <?php
                
                }
                 